package com.runa.rccprotocol.dto.guangda;

import com.runa.rccprotocol.dto.equdata.EquData;
import lombok.Data;

/**
 * 2024/7/12 13:37
 * zhangYB
 */
@Data
public class GdEqu {

    private Long readTime;

    private String serial;

    private String netSerial;

    private String heat;
    private String accHeat;
    private String cold;
    private String accCold;
    private String power;
    private String flow;
    private String accFlow;
    private String supplyTemp;
    private String returnTemp;
    private String workTime;
    private String meterDate;

    private String valveDate;
    private Integer actOpen;

    private String panelDate;
    public float temperature;

    private boolean error;
    private String message;

    public void gdHandleByType(EquData.EquDataType type) {
        if (null == type) {
            return;
        }
        switch(type) {
            case VALVE:
            case PUBLIC_UNIT:
                valveDate = meterDate;
                break;
            case TEMPERATURE_PANEL:
                panelDate = meterDate;
        }
    }
}
